Repository navigation
feat(generate): mesh edit panel driven by the mesh-ops registry - #431
Merged
Merged
Conversation
Every op the chat agent can run is now runnable with a click, no LLM
involved. A new Edit button in the Tools bar opens a side panel next to
the viewer that lists the ops served by GET /optimize/ops:
- Ops are grouped by category in a fixed order (repair, transform,
topology, optimize, presets, analysis); unknown categories still
appear, after the known ones.
- Controls are generated from params_schema with defaults pre-filled:
bounded numbers get a slider plus a number field (log scale when the
range spans 1000x, e.g. face counts), booleans a switch, selects a
dropdown.
- Apply runs POST /optimize/op/{id}; a response with a url goes through
applyMeshEdit, so it lands on the per-model undo stack like an agent
edit. A result is dropped if the viewer moved to another mesh while
the op ran.
- inspect_mesh renders as an inline Mesh health report (watertight,
manifold, winding, printable badges, counts, issues); suggest_fixes
lists its fixes with one-click Apply. Other report-only results show
their fields inline.
- Destructive or non-undoable ops ask for confirmation inside the panel.
- Empty state without a mesh, loading and retryable error states.
The schema mapping, grouping and result helpers live in a pure module
with node tests; the workspace path helper moves there from GeneratePage.
Closes #306
The prepare_for_* presets report one summary per step; the panel now shows them as a numbered list above the detail rows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #306
What
A new Edit button (wrench icon) at the right end of the Tools bar on the Generate page opens a side panel next to the 3D viewer that lists every mesh-ops registry op (
GET /optimize/ops), so anything the chat agent can do is one click away.params_schema: slider + number field for bounded numbers (log scale for wide ranges liketarget_faces), switch for booleans, dropdown forselect, text otherwise. Defaults pre-filled, "Reset to defaults".POST /optimize/op/{id}and hands the new mesh toapplyMeshEdit, the same action the chat agent uses, so every edit goes onto the multi-level undo stack (T-B5 — Multi-level undo #304). If the viewer moved to another mesh while the op ran, the result is discarded instead of overwriting that change.inspect_meshas an inline report with ✓/✗ badges (printable, watertight, manifold, consistent winding, normals outward), stats and issues, flagged as stale once the mesh changes.suggest_fixeslists its fixes with one-click Apply.To check in the running app
<select>elements, so typing in a dropdown can switch the transform tool.Tests
src/areas/generate/meshEditPanel.test.ts(23 tests): schema → control mapping, log slider, clamping, grouping/order, badges, result helpers, preset step summaries.npm run test: Python 366 OK (5 skipped), Node 148 + 212 pass.npm run lintclean,npm run buildOK.